<?php
/**
 * Created by DreamPHP.
 * Auth : Leruge
 * Email : leruge@163.cm
 * Date : 2018/01/29 22:24
 * Url : Http://www.shangjinclub.cn/
 */

namespace app\common\validate;

use think\Validate;

class Cate extends Validate
{
    protected $rule = [
        'catename|栏目名称' => 'require|unique:cate'
    ];

    public function sceneAdd()
    {
        return $this->only(['catename'])
            ->append('catename', ['max:10', 'min:1']);
    }
}
